﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="Experience_Detail.aspx.vb" Inherits="Travelling_Alone.Experience_Detail" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:GridView ID="GridView1" runat="server" style="font-size:medium" 
        AutoGenerateColumns="False" DataKeyNames="ID" DataSourceID="SqlDataSource1">
        <Columns>
            <asp:BoundField DataField="the_author" HeaderText="Author" 
                SortExpression="the_author" />
            <asp:BoundField DataField="the_title" HeaderText="Title" 
                SortExpression="the_title" />
            <asp:BoundField DataField="the_location" HeaderText="Place" 
                SortExpression="the_location" />
            <asp:BoundField DataField="the_time" HeaderText="Time" 
                SortExpression="the_time" />
            <asp:BoundField DataField="the_description" HeaderText="Description" 
                SortExpression="the_description" />
            <asp:ImageField HeaderText="Photo">
                <ControlStyle Height="200px" Width="200px" />
            </asp:ImageField>
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TravellingAloneConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:TravellingAloneConnectionString.ProviderName %>" 
        SelectCommand="SELECT * FROM [experiences] WHERE ([ID] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="ID" QueryStringField="ID" Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />

    COMMENTS FOR THIS EXPERIENCE<br />
    <br />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False">
        <Columns>
            <asp:BoundField DataField="the_author" HeaderText="User" 
                SortExpression="the_author" />
            <asp:BoundField DataField="the_comment" HeaderText="Comment" 
                SortExpression="the_comment" />
        </Columns>
    </asp:GridView>
    <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
        ConnectionString="<%$ ConnectionStrings:TravellingAloneConnectionString %>" 
        ProviderName="<%$ ConnectionStrings:TravellingAloneConnectionString.ProviderName %>" 
        SelectCommand="SELECT [the_author], [the_comment] FROM [experiences_comments] WHERE ([experience_fkid] = ?)">
        <SelectParameters>
            <asp:QueryStringParameter Name="experience_fkid" QueryStringField="ID" 
                Type="Int32" />
        </SelectParameters>
    </asp:SqlDataSource>
    <br />
    <br />
    ADD A COMMENT<br />
    <br />
    <asp:TextBox ID="tb_comment" runat="server" Height="99px" Width="399px" 
        TextMode="MultiLine"></asp:TextBox>
&nbsp;
    

    <br />
    <asp:Button ID="btn_submit" runat="server" Text="Submit"/>
    <br />
    

</asp:Content>
